﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="FAQs.ascx.cs" Inherits="controls_admin_FAQs" %>
<!-- table -->
<div class="box">
    <!-- box / title -->
    <div class="title">
        <h5 id="title" runat="server">
            Hỏi đáp</h5>
        <div class="search">
            <div class="input">
                <asp:TextBox ID="txtKeyword" runat="server" Text="Hãy nhập từ khóa !" onclick='if(this.value=="Hãy nhập từ khóa !")this.value=""'
                    onblur='if(this.value=="")this.value="Hãy nhập từ khóa !"' />
            </div>
            <div class="button">
                <asp:Button ID="btnSearch" runat="server" Text="Tìm Kiếm" OnClick="btnSearch_Click" />
            </div>
        </div>
    </div>
    <div id="divMessage" runat="server">
    </div>
    <div class="first-action">
        <div class="button">
            <a href="default.aspx?control=FAQsAdd">
                <input type="button" value="Thêm Mới" /></a>
        </div>
        <div class="select">
            Chọn danh mục:
            <asp:DropDownList AutoPostBack="true" ID="ddlCategory" runat="server" OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged" />
        </div>
    </div>
    <!-- end box / title -->
    <div class="table">
        <table id="table-3">
            <thead>
                <tr>
                    <th class="smaller">
                        STT
                    </th>
                    <th>
                        Tiêu đề
                    </th>
                    <th>
                        Email
                    </th>
                    <th>
                        Ngày đăng
                    </th>
                    <th>
                        Người đăng
                    </th>
                    <th>
                        Sửa
                    </th>
                    <th class="selected last">
                        <input type="checkbox" class="checkall" />
                    </th>
                </tr>
            </thead>
            <tbody>
                <asp:Repeater ID="rptData" runat="server">
                    <ItemTemplate>
                        <tr id="<%#Eval("ARTICLE_ID") %>">
                            <td class="right">
                                <%#(Container.ItemIndex+1)+(base.Cur_page(pagerContainer)-1)*base.Page_size %>
                            </td>
                            <td class="left">
                                <%#Eval("FULL_ARTICLE_TITLE")%>
                            </td>
                            <td>
                                <%#Eval("SHORT_ARTICLE_DESCRIPTION")%>
                            </td>
                            <td>
                                <%#Eval("APPROVED_DATE", "{0:dd/MM/yyyy}")%>
                            </td>
                            <td>
                                <%#Eval("CREATED_BY")%>
                            </td>
                            <td>
                                <a href="default.aspx?control=faqsedit&id=<%#Eval("ARTICLE_ID").ToString() + "&pager=" + pagerContainer.ClientID + "&" + pagerContainer.ClientID + "=" + Cur_page(pagerContainer).ToString() + "&keyword=" +  Keyword %>"
                                    class="edit" title="Chỉnh sửa">&nbsp;&nbsp;&nbsp;</a>
                            </td>
                            <td align="center" class="last" style="vertical-align: middle">
                                <input id="chkBox" type="checkbox" value='<%#Eval("ARTICLE_ID")%>' class="item" runat="server" />
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </tbody>
        </table>
        <div class="pagination pagination-left last">
            <div class="pagerContainer" id="pagerContainer" runat="server">
            </div>
        </div>
        <div class="action">
            <asp:DropDownList ID="ddlAction" runat="server" OnSelectedIndexChanged="ddlAction_SelectedIndexChanged"
                AutoPostBack="true" CssClass="selectwidth">
                <asp:ListItem Value="0" class="folder-open" Text="---Chọn hành động---"></asp:ListItem>
                <asp:ListItem Value="1" class="locked" Text="Di chuyển tới thùng rác"></asp:ListItem>
                <asp:ListItem Value="2" class="unlocked" Text="Xóa vĩnh viễn"></asp:ListItem>
            </asp:DropDownList>
            <div class="button">
                <a href="default.aspx?control=FAQsAdd">
                    <input type="button" value="Thêm Mới" /></a>
            </div>
        </div>
    </div>
</div>
<!-- end table -->
